Importing Adobe Photoshop files with layers

You can import a Photoshop image with layers to Kanzi Studio and preserve the structure of the .psd file. This allows you to use each layer in a .psd file as a separate image. For example, when you import .psd file that contains one layer for the background and another layer contains a small logo at the corner of the screen, Kanzi Studio creates two .png images in your Kanzi Studio project and two image layers you can use as 2D components in your Kanzi application. The trashbands are removed from the small logo, meaning that you end up with two images of different sizes. The image layer containing the small logo is placed as a child of the background layer and correctly positioned in relation to its parent.

As Kanzi Studio imports layers from a .psd file it:

  1. Crops transparent borders from each layer and saves .png images in the Resource Files > Images in a directory named after the .psd file.
  2. Creates a layer named after the .psd file and a hierarchy of layers corresponding to the structure the imported .psd image. Image layers are used for .psd layer images and transition layers for .psd layers groups.
  3. Applies transformation to each image and transition layer to place it to the same location as in the .psd file.

Note: Kanzi Studio does not support all types of Photoshop layers and layer styles. If Kanzi Studio does not import a layer or layer style, merge or rasterize layers in Photoshop before importing them to Kanzi Studio.

Note: To maintain pixel precision, use integers for all Kanzi Studio 2D layer transformations and avoid stretching or scaling the content.

Importing layers from a .psd image

To import layers from a .psd image:

  1. Select File > Import PSD.
  2. Select the .psd file you want to import.
    Import PSD tool window opens.
  3. In the Select the layers to import column select the layers you want to import from the .psd file to your project, and click Import.
    Kanzi Studio imports the layers you selected, preserves the layer hierarchy from the .psd file, and creates an image layer and a texture for each imported .psd layer. The order in which Kanzi Studio renders layers is set by their order in the Project: a child layer appears on top of the parent layer.

See also

Importing images

Using image layers

Textures